﻿<!DOCTYPE html>
  <head>
  <%= stylesheet_link_tag "demo", "style", "style9" %>
    <title>Library-Management</title>
 <style type="text/css">

 </style>
 <link href="css/style.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" type="text/css" href="css/style9.css" />
    <link rel="stylesheet" type="text/css" href="css/demo.css" />    
        <link href='http://fonts.googleapis.com/css?family=Terminal+Dosis' rel='stylesheet' type='text/css' />
        <style type="text/css">
<!--
.Stile1 {color: #333333}
#Layer9 {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
	left: -441px;
	top: -7px;
}
-->
        </style>
 </head>
  
<body>
<!--login form-->
    <form id="login" action="ham_xu_ly_login.ruby" method="post" accept-charset="utf-8">
      
    </form>


<!--start container -->
<div id="container">
<header>
    <nav>
      <div id="logo">
        <div align="right"><a href="http://localhost:3000"><%= image_tag("logo.png", :size => "204x222", :alt => " Logo here", :align => "left") %></a></div>
      </div>
      <div id="Layer1">
        <div align="right">
          <p>&nbsp;</p>
          <p>
          		<%= link_to image_tag("Vietnam.png", :size => "37x41", :alt => "vietnam???"), home_path(:locale => 'vi') %>
          		<%= link_to image_tag("uk.png", :size => "40x41", :alt => "vietnam???"), home_path(:locale => 'en')%></p>
		  </div>
      </div>
      <div id="search-top">
        <div id="Layer4">
          <form method="post" action="#">
            <div align="center">
              <input name="text" type="text"  id="search-field" onFocus="if(this.value=='Search')this.value='';" onBlur="if(this.value=='')this.value='Search';" value= "<%= t('.search') %>" />
              <input name="submit" type="submit" id="search-btn" value=""/>
            </div>
          </form>
        </div>
        
      <div id="Layer2">
        <p align="center">
        	<a href="https://www.facebook.com/"><%= image_tag("facebook_32.png", :size => "32x32", :alt => "vietnam???")%></a>
        	<a href="https://twitter.com/"><%= image_tag("twitter_32.png", :alt => "vietnam???")%></a>
        	<a href="#"><%= image_tag("linkedin_32.png", :alt => "vietnam???")%></a>
        	<a href="https://mail.google.com/"><%= image_tag("email_32.png", :size => "32x32", :alt => "vietnam???")%></a> </p>
			
			<% if session[:user_id]==nil %> <%# comment %>
			<%= form_tag do %> <%# comment %>
        <p align="center">
          <%= text_field_tag :Username, t('.username') or params[:Username] %>
        </p>
        <p align="center">
          <%= password_field_tag :Password, t('.password') or params[:Password] %>
</p>
      </div>
      <p align="center">&nbsp; </p>
      <p align="center">&nbsp;</p>
      </div>        	

		<div>
	  	<div id="Layer6">
	  		
			<%# image_tag("login.png", :style => "width:62px; height:65px", :alt => "vietnam???") %> <%# comment %>
			
			<%= image_submit_tag("login.png", :style => "width:62px; height:65px", :alt => "vietnam???") %> <%# comment %>
	  	</div>
		<div id="Layer8"><a href="http://localhost:3000/register"><%= image_tag("register.png", :size => "48x50", :alt => "vietnam???")%></a></div>
		<% if flash[:notice] %> <h2><font color="red"><%= flash[:notice] %></font></h2> <% end %>
		<% end %> <%# comment %>
		<% else %>
		<% user=User.find(session[:user_id]) %>
		<h1><%= t('.greet') %> <font color="blue"><%= user.UserName %></font></h1>
		<div>
		<%= button_to "Đăng xuất" ,logout_path, :method => :delete %>
		</div>
		
		<% end %> <%# comment %>
	  	</div>

    </nav>
  </header>
  <%#===========================================================%>
  <div class="content">
  
          
  <!--star main --> 
    
	<% if session[:user_id]!=nil %>
<ul class="ca-menu">
                    <li>
                        <a href="#">
                            <span class="ca-icon">A</span>
                            <div class="ca-content">
                                <h2 class="ca-main"><%= t('.action1') %></h2>
                                <h3 class="ca-sub"><%= t('.content1') %></h3>
                            </div>
                        </a>                    </li>
                    <li>
						<% if(request.fullpath.index('vi')) %>
						<a href="http://localhost:3000/vi/users">
						<% else %>
						<a href="http://localhost:3000/en/users">
						<% end %>
                            <span class="ca-icon">I</span>
                            <div class="ca-content">
                                <h2 class="ca-main"><%= t('.action2') %></h2>
                                <h3 class="ca-sub"><%= t('.content2') %></h3>
                            </div>
                        </a>                    </li>
                    <li>
                        <a href="#">
                            <span class="ca-icon">C</span>
                            <div class="ca-content">
                                <h2 class="ca-main"><%= t('.action3') %></h2>
                                <h3 class="ca-sub"><%= t('.content3') %></h3>
                            </div>
                        </a>                    </li>
                    <li>
                        <a href="#">
                            <span class="ca-icon">S</span>
                            <div class="ca-content">
                                <h2 class="ca-main"><%= t('.action4') %></h2>
                                <h3 class="ca-sub"><%= t('.content4') %></h3>
                            </div>
                        </a>                    </li>
    </ul>
<% end %>
    
	<middle>
	<div align="center">
	
      <%= yield%>  
	 </div>
	 </middle>
    <!--end main -->
	
</div>
<%#======================================================================%>

<!--end middle -->
<!--start footer -->
<footer>  
  <div id="footer">
  <div id="footerleft">
      <h2>24h.com</h2>
      <ul>
        <li><a href="http://hcm.24h.com.vn/">news</a></li>
        <li><a href="..."> ...</a></li>
        <li><a href="..."> ...</a></li>
      </ul>
    </div>
    <div id="footermiddle">
      <h2>IT-news</h2>
      <ul>
        <li><a href="http://www.itnews.com.vn/">news</a></li>
        <li><a href="http://www.itnews.com.vn/">forums</a></li>
        <li><a href="...">...</a></li>
      </ul>
    </div>
    <div id="footerright">
      <h2>Entertainment</h2>
      <ul>
        <li><a href="http://mp3.zing.vn/">Mp3.zing</a></li>
        <li><a href="youtube.com">Video </a></li>
        <li><a href="http://game.24h.com.vn/">Game</a></li>
      </ul>
    </div>
    <details>
<summary>
<p><a href="https://www.facebook.com/NhatTieuPhieuDieu" target="_blank">Nguyen Cong Dinh</a>
  Author &copy; in - 2012.</p></summary>
</details>
    </div>
</footer>
<!--end footer -->
</div>
<!--end container -->
<!-- Free template distributed by http://freehtml5templates.com -->
  </body>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
</html>
